home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1993 / Internet Info CD-ROM (Walnut Creek) (1993).iso / networking / terms / kermit / b / ckvvms.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-30  |  4.1 KB  |  158 lines

  1. /* DEC/CMS REPLACEMENT HISTORY, Element CKVVMS.H */
  2. /* *3    29-AUG-1989 00:32:39 BUDA "Add ^Y/^C from server mode" */
  3. /* *2    16-APR-1989 17:54:51 BUDA "Add definition of SUB_PROC buffer size" */
  4. /* *1    11-APR-1989 22:57:00 BUDA "Initial creation" */
  5. /* DEC/CMS REPLACEMENT HISTORY, Element CKVVMS.H */
  6. /*
  7.  * 005 26-Aug-1992 tmk       Remove unused CKVRMS32 stuff
  8.  * 004 01-Dec-1989 mab       Add RMS support
  9.  * 002 01-Aug-1989 mab       Add partial buffer definition
  10.  * 002 08-Jul-1989 mab       Add ^C/^Y abort code to server mode
  11.  * 001 05-Mar-1989 mab     Put some common pieces in one place
  12.  */
  13.  
  14. /* C-Kermit interrupt, terminal control & i/o functions for VMS systems */
  15.  
  16. /* Mark A. Buda, Digital Equipment Corporation */
  17.  
  18. struct iosb_struct {
  19.     unsigned short status;
  20.     unsigned short size;
  21.     unsigned short terminator;
  22.     unsigned short termsize;
  23. };
  24.  
  25. struct tt_mode {
  26.     unsigned char class;
  27.     unsigned char type;
  28.     unsigned short width;
  29.     unsigned int basic : 24;
  30.     unsigned char length;
  31.     unsigned long extended;
  32. };
  33.  
  34. struct itmlst {
  35.     unsigned short len;
  36.     unsigned short code;
  37.     char *adr;
  38.     char *retlen;
  39. };
  40.  
  41. struct sysatr {
  42.     unsigned long int retval;    /* Address or value returned */
  43.     unsigned long int len;    /* length of item */
  44.     unsigned long int type;
  45.     char *bpnt;            /* Buffer pointer */
  46.     unsigned long int bcnt;    /* Buffer count */
  47.     char *tbuf_adr;        /* Starting address of tmp buffer */
  48.     char *tbuf_pnt;        /* Address within buffer */
  49.     unsigned long int tbuf_len; /* Length of buffer */
  50.     unsigned long int tbuf_cnt;
  51. };
  52.  
  53. struct trmmbx_message {            /* jah - for edit 031 in ckvtio.c */
  54.     unsigned short type;        /* Mailbox message type */
  55.     unsigned short unit;        /* TTY unit number */
  56.     unsigned char ctlname_size;        /* TTY controller name length */
  57.     char ctlname[15];            /* TTY controller name */
  58.     /* Add broadcast message stuff here if/when needed */
  59. };
  60.  
  61. struct trmmbx_struct {            /* jah - for edit 031 in ckvtio.c */
  62.     unsigned short channel;        /* Mailbox channel */
  63.     unsigned short efn;            /* EFN we set for unsolicited input */
  64.     unsigned long status;        /* Completion status set by AST code */
  65.     struct iosb_struct iosb;        /* I/O status block for mailbox read */
  66.     struct trmmbx_message message;    /* A short mailbox message buffer */
  67. };
  68.  
  69. /*  Event flags used for I/O completion testing  */
  70. #define CON_EFN 1
  71. #define TTY_EFN 2
  72. #define TIM_EFN 3
  73. #define QIOW_EFN 4
  74. #define SUCCESS(x) ((vms_status = (x)) & 1)
  75. #define CHECK_ERR(s,x) (SUCCESS(x) ? 1 : print_msg(s))
  76.  
  77. /*
  78.  * Module CKVTIO
  79.  * Routine print_msg(sts)     ! Print VMS error message.
  80.  * define buffer sizes that are malloced at routine first call.
  81.  */
  82. #define PMSG_BUF_SIZE 255
  83. #define PMSG_MSG_SIZE PMSG_BUF_SIZE+5
  84.  
  85. /*
  86.  * Size of Sub process buffer
  87.  * This will have a direct affect on the size of a message that comes
  88.  * from the sub process mailbox.
  89.  */
  90. #define SUB_BUF_SIZE 300
  91.  
  92. /*
  93.  * Maximum length for a device name.  (does not include null terminator)
  94.  */
  95.  
  96. #define DEVNAMLEN 64
  97.  
  98. /*
  99.  * The following macro was borrowed from a posting on USENET - Thank you.
  100.  */
  101.  
  102. #define IDENT(arg) arg    /* Handy macro expands to it's arguments */
  103.  
  104. #define VSTRING(name, maxlen, init)    \
  105.     struct IDENT(name)_vs {        \
  106.     struct dsc$descriptor_s dsc;    \
  107.     unsigned short int curlen;    \
  108.     char body[maxlen];        \
  109.     } name = {{maxlen, DSC$K_DTYPE_VT, DSC$K_CLASS_VS, &name.curlen}, \
  110.     sizeof(init)-1, init}
  111.  
  112. /*
  113.  * Example of VSTRING:
  114.  *
  115.  * VSTRING(user,12,"Humpty Dumpty");
  116.  * VSTRING(line,256,"");
  117.  *
  118.  */
  119.  
  120. /*
  121.  * UCB$M_* symbols are not in a 'C' usable format.  Define this
  122.  * symbol for use in CKVTIO, when doing a getdviw()
  123.  */
  124.  
  125. #ifndef UCB$M_ONLINE
  126. #define UCB$M_ONLINE 16
  127. #endif
  128.  
  129. /*
  130.  * Used by parsedir as the flags argument
  131.  */
  132.  
  133. #define PARSE_NODE    0x001
  134. #define PARSE_DEVICE    0x002
  135. #define PARSE_DIRECTORY    0x004
  136. #define PARSE_NAME    0x008
  137. #define PARSE_TYPE    0x010
  138. #define PARSE_VERSION    0x020
  139.  
  140. /*
  141.  *
  142.  */
  143.  
  144. #define CKV_M_CTRLY (1 << ('Y'-64))
  145. #define CKV_M_CTRLC (1 << ('C'-64))
  146. #define CKV_K_CTRLC ('C'-64)
  147. #define CKV_K_CTRLY ('Y'-64)
  148.  
  149. /*
  150.  * Partial Buffer size.  This is used by zoutdump() when it gets
  151.  * an incomplete record.
  152.  */
  153.  
  154. #define PARTIAL_BUF_SIZE 1024
  155.  
  156.  
  157.  
  158.